<template>
  <div class="logo">
    <div class="logp"></div>
    <div class="logi">
      <div class="inp-q">
        <el-form
          label-position="top"
          size="large"
          :model="userinfo"
          :rules="rules"
          ref="myForm"
        >
          <el-form-item label="用户名" label-width="100px" prop="uname">
            <el-input
              placeholder="请填写你的用户名"
              clearable
              v-model="userinfo.uname"
            >
              <template #prefix>
                <i class="iconfont icon-icon-test1"></i>
              </template>
            </el-input>
          </el-form-item>
          <el-form-item label="密码" label-width="100px" prop="pwd">
            <el-input
              type="password"
              placeholder="不用我告诉你吧"
              v-model="userinfo.pwd"
              show-password
            >
              <template #prefix>
                <i class="iconfont icon-icon-test"></i>
              </template>
            </el-input>
          </el-form-item>

          <el-form-item label="验证码" label-width="100px" prop="code">
            <el-row style="width: 400px">
              <el-col :span="16">
                <el-input
                  placeholder="输入6位验证码"
                  maxlength="6"
                  v-model="userinfo.code"
                >
                  <template #prefix>
                    <i class="iconfont icon-shouji"></i>
                  </template>
                </el-input>
              </el-col>
              <el-col :span="7" :offset="1">
                <div class="code"></div>
              </el-col>
            </el-row>
            <el-button @click="handleLogin" type="primary" class="mt20"
              >登录</el-button
            >
          </el-form-item>
        </el-form>
      </div>
    </div>
  </div>
</template>
<script setup lang="ts">
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import { useStore } from 'vuex'
interface Userinfo {
  uname: string
  pwd: string
  code: string
}
const userinfo = reactive<Userinfo>()
</script>
<script lang="ts">
export default {
  name: 'loGo'
}
</script>
<style scoped lang="scss">
@media screen and (min-width: 900px) {
  .logo {
    width: 100vw;
    height: 100vh;
    display: flex;
    .logp {
      width: 50vw;
      // height: 50vh;
      background: url(https://img.zcool.cn/community/013xnfmppskncwoqep0nyt3537.png?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100)
        no-repeat;
      background-size: 100% 100%;
    }
    .logi {
      width: 50vw;
      // height: 50vh;
      background: url(https://img.zcool.cn/community/01zskc83ogf1r9tfyxelrr3436.png?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100)
        no-repeat;
      background-size: 100% 100%;
      padding: 20px;
    }
  }
}
@media screen and (max-width: 900px) {
  .logi {
    width: 100vw;
    height: 100vh;
    background: url(https://img.zcool.cn/community/01zskc83ogf1r9tfyxelrr3436.png?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100)
      no-repeat;
    background-size: 100% 100%;
    padding: 20px;
  }
}
.logi {
  display: flex;
  justify-content: center;
  align-items: center;
}
.inp-q {
  width: 500px;
  height: 500px;
  padding-top: 200px;
}
</style>
